package com.qf.common.exceptions;

import java.io.Serializable;


public class Resp<T> implements Serializable {


    /**
     * 返回状态：100 处理正确 非100 业务异常
     */
    private int status = RESP_STATUS.SUCCESS.getCode();

    /**
     * 异常返回提示
     */
    private String message;

    /**
     * 返回业务数据
     */
    private T data;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public enum RESP_STATUS {
        SUCCESS(100), FAILED(99);
        private int code;

        RESP_STATUS(int code) {
            this.code = code;
        }

        public int getCode() {
            return code;
        }

        public void setCode(int code) {
            this.code = code;
        }
    }
}
